import { PointObj2 } from '@/types';

export interface StartEndPoint {
  startPoint: PointObj2;
  endPoint: PointObj2;
}
export interface BulgeCurveParam extends StartEndPoint {
  bulge: number;
}
export enum ECurveParamsType {
  Line = 'line',
  Arc = 'arc',
}
export interface LineCurveParam extends StartEndPoint {
  type: ECurveParamsType.Line;
}
export interface ICircle {
  center: PointObj2;
  radius: number;
}
export interface ArcCurveParam extends StartEndPoint {
  circle: ICircle;
  isCCW: boolean;
  type: ECurveParamsType.Arc;
}
export type PairCurveParams<T extends StartEndPoint = IntermediateCurveParam> =
  [T, T];
export type IntermediateCurveParam = LineCurveParam | ArcCurveParam;
